package com.taotao.springboot2;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Springboot2Application {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(Springboot2Application.class, args);


        String configPath = context.getEnvironment().getProperty("spring.config.location");
        String tomcatPort = context.getEnvironment().getProperty("server.port");
        System.out.println(configPath + "," + tomcatPort);
    }

}
